<?php if (!defined('THINK_PATH')) exit();?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jerseys Product</title>
<script type="text/javascript" src="__PUBLIC__/js/Base.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/prototype.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/mootools.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/Ajax/ThinkAjax.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<link href="__PUBLIC__/css/skin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function add() {
		ThinkAjax.sendForm('dataForm', '__URL__/insert', complete, 'result');
	}

	function complete(data, status) {
		if (status == 1) {
			window.setTimeout(function() {
				window.location.href = '__URL__', 20000
			});
		} else {

		}
	}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0"
	enctype="multipart/form-data">
	<tr>
		<td width="17" height="29" valign="top"
			background="__PUBLIC__/images/mail_leftbg.gif"><img
			src="__PUBLIC__/images/left-top-right.gif" width="17" height="29" /></td>
		<td width="935" valign="top"
			background="__PUBLIC__/images/content-bg.gif">
		<table width="100%" height="31" border="0" cellpadding="0"
			cellspacing="0" class="left_topbg" id="table2">
			<tr>
				<td height="31">
				<div class="titlebt">商品管理</div>
				</td>
			</tr>
		</table>
		</td>
		<td width="16" valign="top"
			background="__PUBLIC__/images/mail_rightbg.gif"><img
			src="__PUBLIC__/images/nav-right-bg.gif" width="16" height="29" /></td>
	</tr>
	<tr>
		<td height="71" valign="middle"
			background="__PUBLIC__/images/mail_leftbg.gif">&nbsp;</td>
		<td valign="top" bgcolor="#F7F8F9">
		<table width="100%" height="138" border="0" cellpadding="0"
			cellspacing="0">
			<tr>
				<td height="13" valign="top">&nbsp;</td>
			</tr>
			<tr>
				<td valign="top">
				<table width="98%" border="0" align="center" cellpadding="0"
					cellspacing="0">
					<tr>
						<td class="left_txt">当前位置：<a href="__URL__">商品管理</a></td>
					</tr>
					<tr>
						<td height="20">
						<table width="100%" height="1" border="0" cellpadding="0"
							cellspacing="0" bgcolor="#CCCCCC">
							<tr>
								<td></td>
							</tr>
						</table>
						</td>
					</tr>  
					<tr>
						<td>
						<table width="100%" height="31" border="0" cellpadding="0"
							cellspacing="0" class="nowtable">
							<tr>
								<td class="left_bt2">&nbsp;&nbsp;&nbsp;&nbsp;商品管理</td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<form id="dataForm" name="dataForm" method="POST"
								action="__URL__/insert" enctype="multipart/form-data">
							<tr width="50">
								<td width="10%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">产品编号：</td>
								<td width="90%" height="30" bgcolor="#f2f2f2"><input
									name="product_no" type="text" id="product_no" size="30" /></td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">产品名称：</td>
								<td height="30"><input type="text" name="product_name"
									size="30" id="product_name" /></td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">原始价格：</td>
								<td height="30"><input type="text" name="original_price" size="30" id="original_price" onblur="com.gowholesale.admin.Product.calculateCurrentPrice($('#original_price').val(),$('#discount').val(),'current_price')"/></td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">折扣：</td>
								<td height="30"><input type="text" name="discount" size="30" id="discount" onblur="com.gowholesale.admin.Product.calculateCurrentPrice($('#original_price').val(),$('#discount').val(),'current_price')" />%</td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">出售价格：</td>
								<td height="30">
									<input type="text" name="current_price" size="30" id="current_price" onblur="com.gowholesale.admin.Product.calculateDiscount($('#original_price').val(),$('#current_price').val(), 'discount')" />
								</td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">描述：</td>
								<td>
									<textarea class="ckeditor" cols="80" id="description" name="description" rows="15"></textarea>
								</td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">商品分类：</td>
								<td height="30">
								<select id="list_category" name="list_category[]" multiple="multiple" style="width: 200px">
									<?php if(is_array($categories)): $i = 0; $__LIST__ = $categories;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["category_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
								</select> 
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">商品尺寸：</td>
								<td height="30">
									<?php if(is_array($size)): $i = 0; $__LIST__ = $size;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><input type="checkbox" name="size_list[]" value="<?php echo ($vo["id"]); ?>" /><?php echo ($vo["code_name"]); ?>&nbsp;&nbsp;&nbsp;<?php endforeach; endif; else: echo "" ;endif; ?>
								</td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">商品图片：</td>
								<td height="30"><input type="file" name="pic"></td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">推荐：</td>
								<td height="30">
									<select name="featured">
										<option value="1">Y</option>
										<option value="0">N</option>
									</select>
								</td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">排序：</td>
								<td height="30">
									<input name="featured_order_key" type="text" id="featured_order_key" size="30" />
								</td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">Best sellers：</td>
								<td height="30">
									<select name="best_sellers">
										<option value="1">Y</option>
										<option value="0">N</option>
									</select>
								</td>
							</tr>
							<tr>
								<td height="30" align="right" class="left_txt2">排序：</td>
								<td height="30">
									<input name="best_sellers_order_key" type="text" id="best_sellers_order_key" size="30" />
								</td>
							</tr>
							<tr>
								<td width="50%" height="30" align="center" colspan="2"><input
									type="submit"  value="Submit" name="B1" /> &nbsp;&nbsp;&nbsp; <input
									type="reset" value="Reset" name="B12" /></td>
							</tr>

							</form>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
</body>
</html>